< previous page page_481 next page >

Page 481
The Recordset Object
The Recordset object is what does most of the work with data. You use the Recordset object to retrieve sets of data and to modify that data. The syntax for retrieving and manipulating data using the Recordset object in ADO will be very familiar to any programmer who has used the Jet engine.
Properties of the Recordset Object
There are many properties that you can both read from and write to with the Recordset object. However, only a few are really important for you to learn. If youve already learned about the Recordset object when using the ADO data control, most of the properties listed in Table 24.3 will be a review for you.
Table 24.3 Properties of the Recordset Object.
PropertyDescription
AbsolutePositionThis property is not supported by all OLE DB providers, but if its available, it reports back the row number of where the current record is in the recordset.
ActiveConnectionThis property returns the Connection object used to open the recordset.
BOFReturns True if the cursor is positioned before the first record in the recordset.
BookmarkReturns a value that marks or sets a position in the recordset. This is similar to the primary key of the table; its a unique value. You can use this value to hold the location of a particular record, move to other records, and then return to the record you marked.
EditModeReturns a value that indicates whether the user is adding, editing, or just browsing the data in a recordset.
EOFReturns True if the cursor is positioned after the last record in the recordset.
RecordCountThis property is set to the number of records in the recordset. This property might not be available immediately after you open the recordset. All records in the recordset need to be read before this will have a true count of the records. The only reliable way to ensure this is to scroll all the way through the records until you hit the EOF.

(table continued on next page)

 
< previous page page_481 next page >

If you like this book, buy it!